package com.totoro.service.impl;

import com.totoro.mapper.ShopCouponMapper;
import com.totoro.pojo.MyCoupon;
import com.totoro.pojo.ShopCoupon;
import com.totoro.service.ShopCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author TOTORO
 * @date 2021/7/10 22:28
 */
@Service
public class ShopCouponServiceImpl implements ShopCouponService {

    @Autowired
    ShopCouponMapper shopCouponMapper;

    @Override
    public List<MyCoupon> findAllCouponByUid(int uid) {
        return shopCouponMapper.findAllCouponByUid(uid);
    }

    @Override
    public List<ShopCoupon> findAllCouponByUidAndSid(int uid, int sid) {
        return shopCouponMapper.findAllCouponByUidAndSid(uid, sid);
    }

    @Override
    public List<ShopCoupon> findShopCouponByUidAndSid(int uid, int sid) {
        return shopCouponMapper.findShopCouponByUidAndSid(uid, sid);
    }

    @Override
    public List<ShopCoupon> findShopAllCouponBySid(int sid) {
        return shopCouponMapper.findShopAllCouponBySid(sid);
    }

    @Override
    public ShopCoupon findCouponByCouponId(int scId) {
        return shopCouponMapper.findCouponByCouponId(scId);
    }

}
